package com.lqfan.autoAnswerQ.model.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author zmlin
 * @since 2020-04-09
 */

@Data
public class User extends Model<User> {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    private String id;

    @TableField("userName")
    private String userName;

    @TableField("password")
    private String password;

    @TableField("photo")
    private String photo;

    @TableField("nickName")
    private String nickName;

    @TableField("loginNumber")
    private long loginNumber;

    @TableField("loginTime")
    private String loginTime;

    @TableField("phone")
    private String phone;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", photo='" + photo + '\'' +
                ", nickName='" + nickName + '\'' +
                ", loginNumber=" + loginNumber +
                ", loginTime='" + loginTime + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }
}
